inspector: Cometic fixes for controllers
authorMatthias Clasen <mclasen@redhat.com>
Fri, 12 Apr 2019 02:28:15 +0000 (22:28 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 12 Apr 2019 02:28:15 +0000 (22:28 -0400)
Add a frame, and make the rows not activatable.

gtk/inspector/controllers.c

index 4fa0b313b83a08cfd63387c78c996548c01481a4..deea5b866fd586c357de7f900f33a4784618a29d 100644 (file)
@@ -34,6 +34,7 @@
 #include "gtksortlistmodel.h"
 #include "gtkwidgetprivate.h"
 #include "gtkstack.h"
+#include "gtkstylecontext.h"
 
 enum
 {
@@ -84,6 +85,7 @@ gtk_inspector_controllers_init (GtkInspectorControllers *sl)
   gtk_widget_set_vexpand (box, TRUE);
 
   sl->priv->listbox = gtk_list_box_new ();
+  gtk_style_context_add_class (gtk_widget_get_style_context (sl->priv->listbox), "frame");
   gtk_widget_set_halign (sl->priv->listbox, GTK_ALIGN_CENTER);
   g_signal_connect (sl->priv->listbox, "row-activated", G_CALLBACK (row_activated), sl);
   gtk_list_box_set_selection_mode (GTK_LIST_BOX (sl->priv->listbox), GTK_SELECTION_NONE);
@@ -118,6 +120,7 @@ create_controller_widget (gpointer item,
   GtkWidget *combo;
 
   row = gtk_list_box_row_new ();
+  gtk_list_box_row_set_activatable (GTK_LIST_BOX_ROW (row), FALSE);
   box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 40);
   gtk_container_add (GTK_CONTAINER (row), box);
   g_object_set (box, "margin", 10, NULL);